@extends('layouts.app')
@section('content')
   <div class="container">

       <div class="row">
           <div class="col col-md-8 col-lg-9">
               @include('layouts.post_list')
           </div>

           <div class="col col-md-4 col-lg-3">

               <div class="card">
                   <div class="card-body">
                       <a class="btn btn-success btn-block" href="{{route('posts.create')}}">
                           <i class=""></i>创建文章
                       </a>
                   </div>
               </div>
               <div class="card mt-2">
                   <div class="card-body">
                       <h5 class="text-center">活跃用户</h5>
                       <hr class="mb-0">
                       @if($active_users)
                           @foreach($active_users as $user)
                               <div class="media border-0 active_user_item d-table mt-2">
                                   <img class="mr-2" style="width: 40px;height: 40px;border-radius: 20px"
                                        src="{{asset("storage/$user->image")}}"/>
                                   <span class="align-middle">{{$user->name}}</span>
                               </div>
                           @endforeach
                       @endif
                   </div>
               </div>
           </div>
       </div>
   </div>
@endsection
